import request from '@/utils/request'

// 查询设备调拨列表
export function listSbdb(query) {
  return request({
    url: '/sbgl/sbdb/list',
    method: 'get',
    params: query
  })
}

// 查询设备调拨详细
export function getSbdb(sbdbId) {
  return request({
    url: '/sbgl/sbdb/' + sbdbId,
    method: 'get'
  })
}

// 新增设备调拨
export function addSbdb(data) {
  return request({
    url: '/sbgl/sbdb',
    method: 'post',
    data: data
  })
}

// 修改设备调拨
export function updateSbdb(data) {
  return request({
    url: '/sbgl/sbdb',
    method: 'put',
    data: data
  })
}

// 删除设备调拨
export function delSbdb(sbdbId) {
  return request({
    url: '/sbgl/sbdb/' + sbdbId,
    method: 'delete'
  })
}

// 根据模板导出word
export function exportSbDbWord(query, sbdbId) {
  return request({
    url: '/sbgl/sbdb/exportWord/' + sbdbId,
    method: 'get',
    params: query
  })
}
